//输入人一个字符，分别统计出其中 英文字符、空格、数字和其它字符的个数
#include<assert.h>
struct STATISTIC
{
	size_t Eng_count;
	size_t space_count;
	size_t number;
	size_t order;
}s;
void Count(const char* str, struct STATISTIC* ps)
{
	assert(ps);
	while (*str)
	{
		if (*str >= 'a' && *str <= 'z' || *str >= 'A' && *str <= 'Z')
			ps->Eng_count++;
		else if (*str == ' ')
			ps->space_count++;
		else if (*str >= '0' && *str <= '9')
			ps->number++;
		else
			ps->order++;
		str++;
	}
}
void print(struct STATISTIC * ps)
{
	printf("英文字符有：%u\n", ps->Eng_count);
	printf("空格字符有：%u\n", ps->space_count);
	printf("数字字符有：%u\n", ps->number);
	printf("其它字符有：%u\n", ps->order);
}
int main()
{
	char str[100];
	gets(str);
	Count(str,&s);
	print(&s);
	return 0;
}